Introduction to JupyterLab

  • David Palmquist
    • Library Systems Team, CSUF Pollak Library
  • Chat Assistance
    • Tu-an Nguyen, Analyst/Programmer
    • Christina Cagu, Student Assistant

What will be touched on

  • What is JupyterLab
  • Where can you run it
  • Interface basics
  • Resources
  • Q & A

Poll

Before rolling any further, lets take a moment for a short poll to gauge audience familiarity.

What is JupyterLab?

  • Browser-based interactive environment
  • Combines functional code, data exploration, and presentation in a single portable file
  • Supports Python, R, Julia, and more
  • Ideal for data science, research, and teaching

JupyterLab: power of this, without all the clutter

Old School

Or if you prefer, much of this, less clutter

New School

Vanilla out of the box, looks something like this

JupyterLab Launcher

And you can even go inception and Juptyer like this

IDE

Where can you run Jupyter

Jupyter on Your Hardware

  • Requires more setup effort
  • Limited by your hardware, but keeps data local
  • Example of launching local
    • Notice: URL location

Jupyter Cloud-Based Options

  • Multiple platforms available:
    • Google Colab
    • Kaggle Notebooks
    • Azure Notebooks
    • Binder
    • GitHub Codespaces
    • JupyterHub (e.g., Titan Computing Hub)

Today we will focus on univeral tips for the common experience

  • In the interest of time, lets all work from this jupyter lite example: https://jupyter.org/try-jupyter/lab/
    • jupyter lite is limited since it runs in a browswer sandbox
      • requires no installation
      • limited persistence to browser cache / network options

JupyterLab Interface

  • Menu Bar: File, Edit, View, Run options
  • Left Sidebar: File browser, running kernels, extensions
  • Main Work Area: Notebooks, terminals, text editors

Operations, Tips, and Shortcuts 1

  • Create a notebook
  • Open a notebook
  • Create a Code Cell
  • Run cells

Operations, Tips, and Shortcuts 2

  • Markdown cell
    • Headings
    • Lists
      • ordered
      • unordered
    • Links
    • Images ![plot](./data/matplotlib.png)

Operations, Tips, and Shortcuts 3

  • Use Command Mode and keyboard shortcuts
    • [esc]
    • [a],[b],[x],[z],[m],[y]
  • magic commands
    • %%time sum(i**2 for i in range(1, 50000001))

Kernels

  • Interrupt
  • Restart
    • while True: x=5

Where to Go from Here

Resources

Q & A

Jupyter is an open source tool. Powerful in isolation and even more so in collaboration. It helps limit cognitive load in both generation and consumption of knowledge. In my opinion, the learning curve is worth it, so add it to your tookbox today. Figure out how many things look like a nail tomorrow :)

What questions should we explore?